<%-- 
    Document   : area
    Created on : 2017-9-18, 20:31:00
    Author     : Administrator
--%>

<%@page import="RssEasy.Core.DirectoryExtend"%>
<%@page import="RssEasy.Core.FileExtend"%>
<%@page import="RssEasy.Core.JsonExtend"%>
<%@page import="qqt.area_list.AreaList"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>

<%
    AreaList list = new AreaList(pageContext);
    list.select("id,name,pid").where("state=1").query();
    out.print(DirectoryExtend.Root(request)+"/data/area.js");
    FileExtend.Write(DirectoryExtend.Root(request)+"data/area.js", "var areadata="+JsonExtend.toKeyArrayValue(list.result, 0));
%>